|
Displaying the Page Number, Line Number, Character Number and Column Number for the Current Cursor Location By using the below properties you can display the current cursor location in a Label or StatusBar control. Create a subroutine that can be called in the Form_Load Event, ALLText_KeyUp & ALLText_Click Events (this reads and displays the current cusor location on application startup, using the keyboard and mouse). Example: Sub Update_StatusBar()
End Sub Private Sub ATX451_Click() End Sub Private Sub ATX451_KeyUp(KeyCode As Integer, Shift As Integer) End Sub Private Sub Form_Load() End Sub
Description: Sets or Returns the current page number of the document. Page numbering begins at 0. Syntax: Access:
Remarks: If text is not formatted using the printer device context (ALLText.PrinterDc = False) , ALLText assumes that the contents of the control occupy a single page with length equal to MAX_LONG. In this case, the value of the PageNumber property is always equal to zero. Setting this property repositions the caret to the specified page number.
Description: Determines whether ALLText uses the Printer Device Context for formatting text on the screen. If this property is set to TRUE the hard copy output and the display will be the same (True WYSIWYG). If set to FALSE, ALLText uses the proper device context for the screen resulting in an enhanced on-screen presentation. (this may cause the on-screen word wrapping to be different from printed word wrapping. Syntax: Default: False DataType: Boolean Access:
Remarks: The following properties are affected by setting of the PrinterDC property.
Description: Determines the cursor position in terms of a given line on the current page. The number of the first line on a page is equal to 0. Syntax: Remarks: If text was not formatted using the printer device context (PrinterDC = False), ALLText assumes that the content of the control occupies a single page whose length is equal to MAX_LONG. In this case the value of PageLineNumber property is equal to number of lines from the start of the document to the current cursor position (ie the LineNumber property). On setting this property the caret is positioned to the specified line number on the current page (see PageNumber property).
Description: Read/Set - Setting moves the cursor/caret to the nth character within the current paragraph (as defined by the CurPar property), simultaneously determining the starting edge of a select region. Reading returns either the current cursor/caret offset into a paragraph (if Select property is False), or the character offset of the starting edge of the select region (if Select property is set True) Syntax: Access:
DataType: Integer Values: 0 <= n% <= Number of Characters in the Paragraph specified by CurPar property Default: 0 Remarks: If out of range this property is set to last Character of the Paragraph specified by CurPar property.
Description: Read/Set - Setting moves the cursor/caret to the nth character within the current line (as defined by the CurPar property), Reading returns either the current cursor/caret offset into a line. Syntax: Access:
DataType: Integer Values: 0 <= n% <= Number of Characters in the line specified by CurPar property Default: 0 Remarks: If out of range this property is set to last Character of the line specified by CurPar property. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright© 2003 Bennet-Tec Information Systems, Inc. All rights reserved. |